3.93 \(\int \frac{\left (2-3 x+x^2\right ) \left (d+e x+f x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx\)

Optimal. Leaf size=105 \[ -\frac{x (3 d-4 e+6 f)+5 d-6 e+8 f}{12 \left (x^2+3 x+2\right )}-\frac{1}{36} \log (1-x) (d+e+f)+\frac{1}{144} \log (2-x) (d+2 e+4 f)-\frac{1}{36} \log (x+1) (7 d-13 e+19 f)+\frac{1}{144} \log (x+2) (31 d-50 e+76 f) \]

[Out]

-(5*d - 6*e + 8*f + (3*d - 4*e + 6*f)*x)/(12*(2 + 3*x + x^2)) - ((d + e + f)*Log
[1 - x])/36 + ((d + 2*e + 4*f)*Log[2 - x])/144 - ((7*d - 13*e + 19*f)*Log[1 + x]
)/36 + ((31*d - 50*e + 76*f)*Log[2 + x])/144

_______________________________________________________________________________________

Rubi [A]  time = 0.639148, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161 \[ -\frac{x (3 d-4 e+6 f)+5 d-6 e+8 f}{12 \left (x^2+3 x+2\right )}-\frac{1}{36} \log (1-x) (d+e+f)+\frac{1}{144} \log (2-x) (d+2 e+4 f)-\frac{1}{36} \log (x+1) (7 d-13 e+19 f)+\frac{1}{144} \log (x+2) (31 d-50 e+76 f) \]

Antiderivative was successfully verified.

[In]  Int[((2 - 3*x + x^2)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4)^2,x]

[Out]

-(5*d - 6*e + 8*f + (3*d - 4*e + 6*f)*x)/(12*(2 + 3*x + x^2)) - ((d + e + f)*Log
[1 - x])/36 + ((d + 2*e + 4*f)*Log[2 - x])/144 - ((7*d - 13*e + 19*f)*Log[1 + x]
)/36 + ((31*d - 50*e + 76*f)*Log[2 + x])/144

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 63.1557, size = 102, normalized size = 0.97 \[ \left (\frac{d}{144} + \frac{e}{72} + \frac{f}{36}\right ) \log{\left (- x + 2 \right )} - \left (\frac{d}{36} + \frac{e}{36} + \frac{f}{36}\right ) \log{\left (- x + 1 \right )} - \left (\frac{7 d}{36} - \frac{13 e}{36} + \frac{19 f}{36}\right ) \log{\left (x + 1 \right )} + \left (\frac{31 d}{144} - \frac{25 e}{72} + \frac{19 f}{36}\right ) \log{\left (x + 2 \right )} - \frac{30 d - 36 e + 48 f + x \left (18 d - 24 e + 36 f\right )}{72 \left (x^{2} + 3 x + 2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((x**2-3*x+2)*(f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

(d/144 + e/72 + f/36)*log(-x + 2) - (d/36 + e/36 + f/36)*log(-x + 1) - (7*d/36 -
 13*e/36 + 19*f/36)*log(x + 1) + (31*d/144 - 25*e/72 + 19*f/36)*log(x + 2) - (30
*d - 36*e + 48*f + x*(18*d - 24*e + 36*f))/(72*(x**2 + 3*x + 2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.144277, size = 97, normalized size = 0.92 \[ \frac{1}{144} \left (-\frac{12 (d (3 x+5)-4 e x-6 e+6 f x+8 f)}{x^2+3 x+2}-4 \log (1-x) (d+e+f)+\log (2-x) (d+2 e+4 f)-4 \log (x+1) (7 d-13 e+19 f)+\log (x+2) (31 d-50 e+76 f)\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[((2 - 3*x + x^2)*(d + e*x + f*x^2))/(4 - 5*x^2 + x^4)^2,x]

[Out]

((-12*(-6*e + 8*f - 4*e*x + 6*f*x + d*(5 + 3*x)))/(2 + 3*x + x^2) - 4*(d + e + f
)*Log[1 - x] + (d + 2*e + 4*f)*Log[2 - x] - 4*(7*d - 13*e + 19*f)*Log[1 + x] + (
31*d - 50*e + 76*f)*Log[2 + x])/144

_______________________________________________________________________________________

Maple [A]  time = 0.02, size = 134, normalized size = 1.3 \[ -{\frac{d}{24+12\,x}}+{\frac{e}{12+6\,x}}-{\frac{f}{6+3\,x}}+{\frac{31\,\ln \left ( 2+x \right ) d}{144}}-{\frac{25\,\ln \left ( 2+x \right ) e}{72}}+{\frac{19\,\ln \left ( 2+x \right ) f}{36}}-{\frac{\ln \left ( -1+x \right ) d}{36}}-{\frac{\ln \left ( -1+x \right ) e}{36}}-{\frac{\ln \left ( -1+x \right ) f}{36}}-{\frac{7\,\ln \left ( 1+x \right ) d}{36}}+{\frac{13\,\ln \left ( 1+x \right ) e}{36}}-{\frac{19\,\ln \left ( 1+x \right ) f}{36}}-{\frac{d}{6+6\,x}}+{\frac{e}{6+6\,x}}-{\frac{f}{6+6\,x}}+{\frac{\ln \left ( x-2 \right ) d}{144}}+{\frac{\ln \left ( x-2 \right ) e}{72}}+{\frac{\ln \left ( x-2 \right ) f}{36}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((x^2-3*x+2)*(f*x^2+e*x+d)/(x^4-5*x^2+4)^2,x)

[Out]

-1/12/(2+x)*d+1/6/(2+x)*e-1/3/(2+x)*f+31/144*ln(2+x)*d-25/72*ln(2+x)*e+19/36*ln(
2+x)*f-1/36*ln(-1+x)*d-1/36*ln(-1+x)*e-1/36*ln(-1+x)*f-7/36*ln(1+x)*d+13/36*ln(1
+x)*e-19/36*ln(1+x)*f-1/6/(1+x)*d+1/6/(1+x)*e-1/6/(1+x)*f+1/144*ln(x-2)*d+1/72*l
n(x-2)*e+1/36*ln(x-2)*f

_______________________________________________________________________________________

Maxima [A]  time = 0.696648, size = 123, normalized size = 1.17 \[ \frac{1}{144} \,{\left (31 \, d - 50 \, e + 76 \, f\right )} \log \left (x + 2\right ) - \frac{1}{36} \,{\left (7 \, d - 13 \, e + 19 \, f\right )} \log \left (x + 1\right ) - \frac{1}{36} \,{\left (d + e + f\right )} \log \left (x - 1\right ) + \frac{1}{144} \,{\left (d + 2 \, e + 4 \, f\right )} \log \left (x - 2\right ) - \frac{{\left (3 \, d - 4 \, e + 6 \, f\right )} x + 5 \, d - 6 \, e + 8 \, f}{12 \,{\left (x^{2} + 3 \, x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="maxima")

[Out]

1/144*(31*d - 50*e + 76*f)*log(x + 2) - 1/36*(7*d - 13*e + 19*f)*log(x + 1) - 1/
36*(d + e + f)*log(x - 1) + 1/144*(d + 2*e + 4*f)*log(x - 2) - 1/12*((3*d - 4*e
+ 6*f)*x + 5*d - 6*e + 8*f)/(x^2 + 3*x + 2)

_______________________________________________________________________________________

Fricas [A]  time = 0.354541, size = 258, normalized size = 2.46 \[ -\frac{12 \,{\left (3 \, d - 4 \, e + 6 \, f\right )} x -{\left ({\left (31 \, d - 50 \, e + 76 \, f\right )} x^{2} + 3 \,{\left (31 \, d - 50 \, e + 76 \, f\right )} x + 62 \, d - 100 \, e + 152 \, f\right )} \log \left (x + 2\right ) + 4 \,{\left ({\left (7 \, d - 13 \, e + 19 \, f\right )} x^{2} + 3 \,{\left (7 \, d - 13 \, e + 19 \, f\right )} x + 14 \, d - 26 \, e + 38 \, f\right )} \log \left (x + 1\right ) + 4 \,{\left ({\left (d + e + f\right )} x^{2} + 3 \,{\left (d + e + f\right )} x + 2 \, d + 2 \, e + 2 \, f\right )} \log \left (x - 1\right ) -{\left ({\left (d + 2 \, e + 4 \, f\right )} x^{2} + 3 \,{\left (d + 2 \, e + 4 \, f\right )} x + 2 \, d + 4 \, e + 8 \, f\right )} \log \left (x - 2\right ) + 60 \, d - 72 \, e + 96 \, f}{144 \,{\left (x^{2} + 3 \, x + 2\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="fricas")

[Out]

-1/144*(12*(3*d - 4*e + 6*f)*x - ((31*d - 50*e + 76*f)*x^2 + 3*(31*d - 50*e + 76
*f)*x + 62*d - 100*e + 152*f)*log(x + 2) + 4*((7*d - 13*e + 19*f)*x^2 + 3*(7*d -
 13*e + 19*f)*x + 14*d - 26*e + 38*f)*log(x + 1) + 4*((d + e + f)*x^2 + 3*(d + e
 + f)*x + 2*d + 2*e + 2*f)*log(x - 1) - ((d + 2*e + 4*f)*x^2 + 3*(d + 2*e + 4*f)
*x + 2*d + 4*e + 8*f)*log(x - 2) + 60*d - 72*e + 96*f)/(x^2 + 3*x + 2)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x**2-3*x+2)*(f*x**2+e*x+d)/(x**4-5*x**2+4)**2,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.285846, size = 136, normalized size = 1.3 \[ \frac{1}{144} \,{\left (31 \, d + 76 \, f - 50 \, e\right )}{\rm ln}\left ({\left | x + 2 \right |}\right ) - \frac{1}{36} \,{\left (7 \, d + 19 \, f - 13 \, e\right )}{\rm ln}\left ({\left | x + 1 \right |}\right ) - \frac{1}{36} \,{\left (d + f + e\right )}{\rm ln}\left ({\left | x - 1 \right |}\right ) + \frac{1}{144} \,{\left (d + 4 \, f + 2 \, e\right )}{\rm ln}\left ({\left | x - 2 \right |}\right ) - \frac{{\left (3 \, d + 6 \, f - 4 \, e\right )} x + 5 \, d + 8 \, f - 6 \, e}{12 \,{\left (x + 2\right )}{\left (x + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x^2 + e*x + d)*(x^2 - 3*x + 2)/(x^4 - 5*x^2 + 4)^2,x, algorithm="giac")

[Out]

1/144*(31*d + 76*f - 50*e)*ln(abs(x + 2)) - 1/36*(7*d + 19*f - 13*e)*ln(abs(x +
1)) - 1/36*(d + f + e)*ln(abs(x - 1)) + 1/144*(d + 4*f + 2*e)*ln(abs(x - 2)) - 1
/12*((3*d + 6*f - 4*e)*x + 5*d + 8*f - 6*e)/((x + 2)*(x + 1))